home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / PET / S-Super PET / (s)tj.d64 / RS232.START.ASM < prev    next >
Assembly Source File  |  2009-01-18  |  1KB  |  74 lines

  1.         ;rs232.start.asm       Oct 12, 1983
  2. opt     nolist
  3. xdef    old_irq
  4.  
  5. xref    screen_setup
  6. xref    accept_commands
  7.  
  8. xref    irq_ , new_irq
  9. xref    spawn_,suicide_
  10.  
  11. service_        equ     $32
  12.  
  13. start1  equ     *                       ;from other MLR or cold start
  14.  
  15.         clr     service_
  16.         ldd     #start2
  17.         jmp     spawn_
  18.  
  19. start2  equ     *                       ;from moitor
  20.  
  21.         jsr     compress_screen
  22.         jsr     screen_setup
  23.         jsr     link
  24.         jsr     accept_commands
  25.         jsr     unlink
  26.         jsr     expand_screen
  27.  
  28.         jsr     suicide_
  29.  
  30. register        equ     $e880
  31. data            equ     register+1
  32.  
  33. compact fdb     $0428,$0505,$0721,$0907 ,0
  34. expand  fdb     $0420,$0503,$071d,$0909 ,0
  35.  
  36. compress_screen equ     *
  37.  
  38.         pshs    x,d
  39.  
  40.         ldx     #compact
  41.  
  42. store_configuration     equ     *
  43.  
  44.         loop
  45.                 ldd     ,x++
  46.         quif    eq
  47.                 std     register
  48.         endloop
  49.  
  50.         puls    d,x
  51.         rts
  52.  
  53. expand_screen   equ     *
  54.  
  55.         pshs    x,d
  56.         ldx     #expand
  57.         bra     store_configuration
  58.  
  59.  
  60. link    ldd     irq_
  61.         std     old_irq
  62.  
  63.         ldd     #new_irq
  64.         std     irq_
  65.  
  66.         rts
  67.  
  68. unlink  ldd     old_irq
  69.         std     irq_
  70.         rts
  71.  
  72. old_irq fdb     $0000
  73. end
  74.